package com.hl.BootMybatis.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.hl.BootMybatis.base.model.Page;
import com.hl.BootMybatis.mapper.DemoMapper;
import com.hl.BootMybatis.model.Demo;
import com.hl.BootMybatis.service.IDemoService;

@Service("demoService")
public class DemoServiceImpl implements IDemoService {

    @Resource
    private DemoMapper demoMapper;

    @Override
    public Page findPage(Page page) {
        List<Demo> list = demoMapper.findPage(page);
        page.setData(list);
        return page;
    }

    @Override
    public List<Demo> findList() {
        return demoMapper.findList();
    }
}
